package com.test.spring;

import com.test.spring.annotation.Autowired;
import com.test.spring.annotation.Component;
import com.test.spring.annotation.EnableAOP;
import com.test.spring.annotation.Scope;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Component("hello")
@Scope("singleton")
@EnableAOP
@Data
@AllArgsConstructor
@NoArgsConstructor
public class HelloService implements Hello {
    @Autowired
    private WorldService worldService;
    @Autowired
    private HelloJava helloJava;
    public void hello(){
        worldService.sayHello();
        helloJava.sayHello();
        System.out.println("hello,world");
    }

    public static void main(String[] args) {
        System.out.println(HelloService.class.getName());
    }
}
